import requests
from lxml import etree

response = requests.get(url='http://spiderbuf.cn/s05/').text

document = etree.HTML(response)

cols = document.xpath("//*[@class='col-sm-4']/img/@src")
for item in cols:
    cn = f"http://spiderbuf.cn{item}"
    headers = {
        "Referer":"http://spiderbuf.cn/s05/",
        "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
    }
    img_content = requests.get(url=cn,headers=headers).content
    with open(item.split('/')[4],'wb') as f:
        f.write(img_content)
        print(f"{item.split('/')[4]}\t下载成功！")